﻿using Microsoft.AspNetCore.Http;
using Volo.Abp.DependencyInjection;

namespace Yyd.Security.Permissions
{
    public class WebClientTransportPermission : IClientTransportPermission, ITransientDependency
    {
        private readonly IHttpContextAccessor _httpContextAccessor;

        public WebClientTransportPermission(IHttpContextAccessor httpContextAccessor)
        {
            _httpContextAccessor = httpContextAccessor;
        }

        public string OperateName => _httpContextAccessor.HttpContext?.Request?.Headers["functional-authority"];
        public string AttachName => _httpContextAccessor.HttpContext?.Request?.Headers["accessory-authority"];
    }
}
